package com.suxin.socket.vaca.other.config;

import lombok.Getter;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Value;

/**
 * @ClassName: JwtAuthenticationConfig
 * @Description: Jwt权限验证配置类
 * @date: 2019/5/30
 * @author: lurf@suxiniot.com
 */
@Getter
@ToString
public class JwtAuthenticationConfig {

    /**
     * 可变配置，写在配置文件中
     */
    @Value("${security.jwt.url}")
    private String url;

    @Value("${security.jwt.url.prefix}")
    private String excludeUrlPrefix;

    @Value("${security.jwt.url.suffix}")
    private String excludeUrlSuffix;

    @Value("${security.jwt.header:Authorization}")
    private String header;

    @Value("${security.jwt.header:RefreshToken}")
    private String refreshToken;

    @Value("${security.jwt.prefix:Bearer}")
    private String prefix;

    @Value("${security.jwt.expiration:#{3*24*60*60}}")
    private int expiration;

    @Value("${security.jwt.refreshExpiration:#{90*24*60*60}}")
    private int refreshExpiration;

    @Value("${security.jwt.secret:yrfeifrjohgh}")
    private String secret;

    @Value("${security.jwt.role:authorizes}")
    private String authorizes;

    @Value("${security.jwt.user.info:info}")
    private String info;

}
